<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PSAdmin.Core.PagedList<PSAdmin.Core.Domain.UserEvent>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Audit Log
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Audit Log</h2>   
    <table class="auditLog">
        <thead>
            <tr>
                <th>Date/Time</th>
                <th>Event Type</th>
                <th>Username</th>
                <th>Hostname</th>
                <th>IP Address</th>
                <th>Script Name</th>
                <th>Script Variables</th>
            </tr>
        </thead>
        <%foreach (var userEvent in Model) { %>
            <tr>
                <td><%=Html.Encode(userEvent.DateCreated) %></td>
                <td><%=Html.Encode(userEvent.Behaviour) %></td>
                <td><%=Html.Encode(userEvent.Username) %></td>
                <td><%=Html.Encode(userEvent.HostName) %></td>
                <td><%=Html.Encode(userEvent.IP) %></td>
                <td><%=Html.Encode(userEvent.ScriptName) %></td>
                <td><%=Html.CRToHtml(userEvent.ScriptVariables) %></td>
            </tr>
        <%} %>
    </table>
    
    <div class="pager">
        <p>
            Page: <%= Html.PageLinks(Model.PageIndex, Model.PageCount, 
                      x => Url.Action("Index", new { page = x })) %>
        </p>
    </div>
</asp:Content>
